package com.linglingC.mapper;


import com.linglingC.pojo.ItemCharge;
import org.apache.ibatis.annotations.*;

import java.util.ArrayList;

@Mapper
public interface ItemChargeMapper {

    @Select("select * from itemcharge")
    ArrayList<ItemCharge> findAll();

    @Options(useGeneratedKeys = true,keyProperty = "cId")
    @Insert("insert into itemcharge(pId, rId, charge, startime, endtime) " +
            "values (#{pId}, #{rId}, #{charge}, #{starTime}, #{endTime})")
    void addItemCharge(ItemCharge itemCharge);
}
